package com.jw.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author jiangwang
 * @Created by 2021/3/23 16:16
 * @Description: TODO
 */
@Configuration
public class RestTemplateConfig {

    @Bean
    @LoadBalanced  //配置负载均衡注解
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
